﻿<!DOCTYPE html>
<html>
<head>
<title>试题练习 - {$:#.org.org_platformname}</title>
<vt:include file="inc/meta.inc" />
<script type="text/javascript" src="Scripts/Exercises.js?ver={$version}"></script>
<link href="Styles/Exercises.css?ver={$version}" rel="stylesheet" type="text/css" />
</head>
<body>
<script>
    document.body.onselectstart = document.body.oncontextmenu = function () { return false; };
    document.body.onpaste = document.body.oncopy = function () { return false; };
</script>
<!--选择区域 -->
<div id="selectArea">
<div id="btnShow">折叠/展开</div>
  <div class="selectBar" id="SelectedBar">
    <div class="selectLeft"> 已经选条件：</div>
    <div class="selectRight" id="Selected"> 所有 </div>
  </div>
  <div id="subject">
    <div class="selectBar">
      <div class="selectLeft"> 题型：</div>
      <div class="selectRight">
        <vt:foreach id="quesType" from="$#.quesType" item="data" index="i" remark="题型">
          <div class="selectItem"><a href="#" attr="type" clear="index" type="{$:i}">{$:#.data} </a> </div>
        </vt:foreach>
      </div>
    </div>
    <div class="selectBar">
      <div class="selectLeft"> 难度：</div>
      <div class="selectRight">
        <vt:foreach id="diff" from="$#.diff" item="data" level="很容易,容易,一般,较难,比较难" index="i"
                            remark="难度">
          <div class="selectItem"><a href="#" attr="diff" clear="index" diff="{$:i}">{$:#.data} </a> </div>
        </vt:foreach>
      </div>
    </div>
    <div class="selectBar">
        <div class="selectLeft"> 题量：</div>
        <div class="selectRight">
           <vt:foreach from="$#.pager" item="p" index="i"  remark="每页显示多少道题">
                        <div class="selectItem"><a href="#" attr="index" index="{$:#.p.index}-{$:#.p.size}" size="{$:#.p.size}">{$:#.p.index}-{$:#.p.end}</a> </div>
          </vt:foreach>
          <vt:if var="isTry" value="true" compare="=">
           <div class="selectItem"><span class="trySpan">（试用状态）</span> </div>
           </vt:if>
        </div>
      </div>
  </div>
</div>
<!--  控制区 -->
<div id="controlBox">
  <div id="titleBox">
    
    <div class="number"><span class="sumSpan">第<font id="indexNum" initIndex="{$index}" index="1">{$index}</font>/<font id="sumCount">{$sumCount}</font>道</span> <span class="succSpan">正确 <font id="succCount">0</font> 题</span> <span class="pecSpan">正确率 <font id="perCount">0</font> %</span> </div>
  </div>
  <vt:if var="ques.Length" value="0" compare=">">
    <div class="btnBox">
      <div id="btnAnswer" class="btn"><span class="iconfont">&#xe621;</span> 参考答案</div>
      <div id="btnExplan" class="btn"><span class="iconfont">&#xe6b0; </span> 试题解析 </div>
      <div id="btnKnl" class="btn"><span class="iconfont"> &#xe636;</span> 学习资料</div>
    </div>
    <div id="ctlBtn">
      <div id="btnPrev" class="btn"> <span>&lt;&lt;</span> 上一题 </div>
      <div id="btnNext" class="btn"> 下一题 <span>&gt;&gt;</span></div>
    </div>
  </vt:if>
</div>
<!--试题区 -->
<div id="quesArea">
  <vt:if var="ques.Length" value="0" compare=">">
    <vt:foreach id="ques" from="$#.ques" item="q" index="i" remark="试题">
      <vt:function var="IsCollect" method="IsCollect" args="$#.q.qus_id"/>
      <vt:expression var="qindex" args="$i" args="$index" expression="{0}+{1}-1" />
      <div class="quesItem" qid="{$:#.q.qus_id}" index="{$:i}" IsCollect="{$:#.IsCollect}" type="{$:#.q.qus_type}">
        <div class="quesBox"> 
          <!--试题的题干 -->
          <vt:function var="typeName" method="GetTypeName" args="$#.q.qus_type"/>
          <div class="quesTitle">{$qindex}、[{$:#.typeName}题] {$:#.q.qus_title} </div>
          <!--试题答案选项 -->
          <div class="quesAnswerBox">
            <vt:if var="q.qus_type" value="1" compare="="> 
              <!--单选题 -->
              <vt:function var="items" method="AnswerItems" args="$#.q"/>
              <vt:foreach from="$#.items" item="ans" index="j">
                <vt:function var="tax" method="GetOrder" args="$j"/>
                <div class="answer"  correct="{$:ans.Ans_IsCorrect}" ansid="{$:ans.Ans_id}"><span class="iconfont type">&#xf00c6;</span>{$:tax}、{$:ans.Ans_Context} </div>
              </vt:foreach>
            </vt:if>
            <vt:if var="q.qus_type" value="2" compare="="> 
              <!--多选题 -->
              <vt:function var="items" method="AnswerItems" args="$#.q"/>
              <vt:foreach from="$#.items" item="ans" index="j">
                <vt:function var="tax" method="GetOrder" args="$j"/>
                <div class="answer"  correct="{$:ans.Ans_IsCorrect}" ansid="{$:ans.Ans_id}"><span class="iconfont type">&#xe603;</span>{$:tax}、{$:ans.Ans_Context} </div>
              </vt:foreach>
            </vt:if>
            <vt:if var="q.qus_type" value="3" compare="="> 
              <!--判断题 -->
              <vt:function var="answer" method="GetAnswer" args="$#.q"/>
              <vt:if var="answer" value="正确" compare="=">
                <div class="answer" correct="true" ansid="0"><span class="iconfont type">&#xe621;</span>A、&nbsp;正确</div>
                <div class="answer" correct="false" ansid="1"><span class="iconfont type">&#xe621;</span>B、&nbsp;错误</div>
                <vt:else/>
                <div class="answer" correct="false" ansid="0"><span class="iconfont type">&#xe621;</span>A、&nbsp;正确</div>
                <div class="answer" correct="true" ansid="1"><span class="iconfont type">&#xe621;</span>B、&nbsp;错误</div>
              </vt:if>
            </vt:if>
            <vt:if var="q.qus_type" value="4" compare="=">
              <div class="answer">
                <div><span class="iconfont type1">&#xe657;</span> 回答：</div>
                <textarea name="" class="textbox4"></textarea>
              </div>
            </vt:if>
            <vt:if var="q.qus_type" value="5" compare="="> 
              <!--填空题 -->
              <vt:function var="items" method="AnswerItems" args="$#.q"/>
              <vt:foreach from="$#.items" item="ans" index="j">
                <vt:function var="tax" method="GetOrder" args="$j"/>
                <div class="answer" correct="{$:ans.Ans_Context}" ><span class="iconfont type1">&#xe657;</span>{$:tax}、
                  <input name=""  class="textbox5" type="text"/>
                </div>
              </vt:foreach>
            </vt:if>
          </div>
        </div>
      </div>
    </vt:foreach>
    <vt:else/>
    <!--没有试题 -->
    <vt:if var="isTraningLogin" value="true" compare="=">
      <vt:if var="Account.Ac_id" value="0" compare=">">
        <vt:if var="Account.Ac_isPass" value="false" compare="=">
          <div id="noQues">学员必须通过审核后方可以进行试题练习！<br/>
          </div>
          <vt:else/>
          <div id="noQues">当前选择范围没有供学习的试题！<br/>
            请选择其它的选项。</div>
        </vt:if>
        <vt:else/>
        <div id="noQues">请学员登录后学习！<br/>
          <a href="/student/index.ashx">点击此处登录</a> </div>
      </vt:if>
      <vt:else/>
      <div id="noQues">当前选择范围没有供学习的试题！<br/>
        请选择其它的选项。</div>
    </vt:if>
  </vt:if>
</div>
</body>
</html>
